package com.ymttest.database.sqlwapper.CSIM;

import java.math.BigDecimal;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.ymt.core.tool.Logger;
import com.ymt.database.SqlManager;
import com.ymttest.database.model.YmtFundDimension;
import com.ymttest.database.model.ymt_cssession;
import com.ymttest.database.model.ymt_queuesession;
import com.ymttest.utils.EnvSetup;

/************************************************************************************
 * @File name : ymt_cssessionWapper.java
 * @Author : 吴文
 * @Date : 2016年11月24日
 * @Copyright : 洋码头
 * csim
 ************************************************************************************/
public class ymt_queuesessionWapper {
	SqlManager manage;

	
	public ymt_queuesessionWapper() {
		manage = new SqlManager("ymtcsim" + EnvSetup.getEnv());
		 
	}
	public int selectBy_Count(Map<String,Object> map) throws InterruptedException {
		
		List<Map> resultMap= manage.getSelectResults("com.ymttest.database.mapping.ymt_queuesessionMapper.selectBy_Count",map);
	
		int result=Integer.parseInt(resultMap.get(0).get("count").toString());
		manage.commit();
		return result;
	}
	public  List<ymt_queuesession> selectBy(Map<String,Object> map) 
	{
		List<ymt_queuesession> resultMap= manage.getSelectResults("com.ymttest.database.mapping.ymt_queuesessionMapper.selectBy",map);
		manage.commit();
		return resultMap;
	}
	public List<ymt_queuesession> getTopListByUserTypeAndCallType(Map<String,Object> map) 
	{
		List<ymt_queuesession> resultMap= manage.getSelectResults("com.ymttest.database.mapping.ymt_queuesessionMapper.getTopListByUserTypeAndCallType",map);
		manage.commit();
		return resultMap;
	}
	public int deleteByPrimaryKey(int id) throws InterruptedException {
		
		int count= manage.update("com.ymttest.database.mapping.ymt_queuesessionMapper.deleteByPrimaryKey",id);
		manage.commit();
		return count;
	}
	public int deleteAll()
	{
		int count= manage.delete("com.ymttest.database.mapping.ymt_queuesessionMapper.deleteAll",null);
		manage.commit();
		return count;
	}
	
	
	public int updateByPrimaryKey(ymt_queuesession record) throws InterruptedException {
		
		int count= manage.update("com.ymttest.database.mapping.ymt_queuesessionMapper.updateByPrimaryKey",record);
		manage.commit();
		return count;
	}
	public static void main(String args[]) {
	  
	}
	
	
}
